﻿@model Contrib.AppFabric.ViewModels.FarmManagementViewModel
           
@{
    Layout.Title = T("AppFabric Farm Management");

}

<table class="items">
    <thead>
        <tr>
            <th scope="col">@T("Region")</th>
            <th scope="col">@T("Url")</th>
            <th scope="col">@T("Cached On")</th>
            <th scope="col">@T("Cached Until")</th>
            <th scope="col">&nbsp;</th>
        </tr>
    </thead>
    @foreach(var region in Model.RegionLevelCaches) {
        foreach(var cacheItem in region.Value) {
            <tr>
                <td>@region.Key</td>
                <td>@cacheItem.Url</td>
                <td>@Display.DateTimeRelative(dateTimeUtc: cacheItem.CachedOnUtc)</td>
                <td>@cacheItem.ValidUntilUtc.ToLocalTime()</td>
                <td>@Html.ActionLink(T("Evict").Text, "Evict", new {Area = "Contrib.AppFabric", Controller = "Statistics", cacheKey = cacheItem.CacheKey})</td>
            </tr>
        }
    }
</table>